‫Welcome back.
‫This is the next to fall in little three, we set up this file, the EPA dopa fire.
‫We wrote some code here.
‫We do some good here.
‫We are able to access our API for the browser, as you can see, but we are not able to access the same
‫API from within posthuman.
‫And remember, when you are writing an API, maybe you are writing an EPA to be consumed by a mobile
‫app outside, or you have another application that you have written for front end that could be running
‫Angara, that gourami could be running future years or it could be running my favorite front end framework
‫and that is really G.S. or whatever other framework you're using for your front end.
‫The applications that you are going to be writing here.
‫The server side code that you're going to be writing, that we are calling API is going to be consumed
‫by that application.
‫It is not going to be running on the browser like this one on Rubirosa, like this one.
‫Therefore, you need to see or know how to to sort this problem out.
‫I am going to show you in this section.
‫So let's jump into Europe next.
‫Then I would like us, first of all, to click on it.
‫And here we can just call it this Europea next mustardy series.
‫And then this is ERP next series for the name.
‫My study.
‫Yep, that's it.
‫And the item group.
‫Let me just say, this is obviously remember, this is this year.
‫This is for the purpose of this demo only.
‫I don't want to add in stock and a bit of music in the unit, OK, and I save it and let me finish this
‫one.
‫Now I am going to find that they have a new application here if I check my database.
‫Likewise, I have an application here.
‫So my database now has one item.
‫Right.
‫Let me try and refresh my application here and I don't get anything yet.
‫Why?
‫I do not know.
‫Let us find out.
‫So what you are supposed to do here, you can see that this one is returning zero as well.
‫So let me try and restart my server and see what happens.
‫So my service restarting, I can run this one just to make sure that my server is ready.
‫OK, my staff is still getting started, this one is running, try and refresh your browser.
‫He still returns to zero.
‫Take your time.
‫You know, there's nothing on the terminal yet.
‫It's supposed to print is supposed to print on the terminal.
‫Are the subways still loading?
‫I can hear my computer screaming.
‫Benge is kind of heavy, I think, depending on the computer you are using,
‫kids running.
‫And then he is doing a lot of get, get, get, get stuff.
‫So reload, see whether it is it best to drop something on the.
‫No, not yet.
‫He's doing is still doing its thing here.
‫So basically what I wanted to show you is that when you because it's not jumping up, when you when
‫you know this Broza, it's not still going to show you the item that you have added here.
‫And that is because when you come back to our API, we have told AP to print stuff on the Tamino.
‫So we have not it to return anything.
‫So if you need to return, this is how you need to know this in an API.
‫So this is very critical.
‫You need to have a written statement if you need to return anything from your API.
‫And what you have here is what I'm going to stand here.
‫So now in this case, I do not need the return to the print statement because it's not the execution
‫is not going to get there in and if it comes in full before they're done.
‫So I am returning something now.
‫Oh, this thing has painted.
‫So you can see before before it what it was doing.
‫Also, all the rules I have done it is pasting our application on the terminal here.
‫OK, so all the rules.
‫I have no idea Aspies that.
‫Here, let me first of all, let me undo here up to that point.
‫And how many do we have?
‫We have one, two, three.
‫And let me load the browser again, Lord, and see what we have here.
‫We have another one.
‫You see, they say this is an object here and you can see your brother theory does nothing.
‫So when you come to the terminal, we have this database that here this is the item that we have just
‫added.
‫You can see that the item code is this one.
‫This is the name in the database.
‫And then we have all other services, including the description with the description, European examples
‫that like this is to have added ideally, this is the item that we have here.
‫OK, so if you want this browser to print anything here, like, I will see you need to print so I can
‫leave that one there and you need to return, not print.
‫You need to return something.
‫And I want us to return the items in this case.
‫So these items, whatever we are going to get here is what I want to return.
‫And now when I go to my browser and reload, I am going to see the same thing that was coming back on
‫the terminal.
‫So the exact thing that is here is what I am seeing now on my browser.
‫Remember, still, we are not able to access this thing using postmarks, but I'm going to I'm going
‫to come back to this.
‫Don't worry about that.
‫So what I wanted to point out here is remember that your apps need to return whatever you wanted to
‫return to the applications.
‫And this is how you are going to send data from your app to other from your API to other applications.
‫So now why is Postman complaining that we do not have permissions to do this?
‫And that is what I'm about to show you if you want to.
‫You remember when we were introducing this, this, this, this, this cause I told you that there are
‫two types of apps, this one area that is open to the public and there's another application that we
‫need you to authenticate it.
‫Now, this is an exact this is the kind of an API that needs you to authenticate before it can do whatever
‫you are requesting it to do here.
‫So how you went with the ticket, it had to your application go to users.
‫OK, so I'm teaching, you know, how to authenticate your ticket, your application.
‫I can select any user here like the administrator, how to authenticate your APIs, selecting the user.
‫Go to API, scroll down to the application, and then here you have you have the API key and the EPA
‫talking.
‫I had generated these some sometimes back.
‫So if you don't have just click on generate keys.
‫Let me see what I can get into that note of what I was doing before so I can go back to my postman and
‫see whether maybe from the history of this application I can get
‫somewhere I wrote.
‫Let me see.
‫One, two, seven.
‫Yeah I.
‫Is this.
‫Yeah I have my own here so I can go to headers.
‫So what you're going to do.
‫I have mine now, so what do I going to do after you have generated your case, not the EPA secret before
‫you close it?
‫Just take it, take it and maybe put it inside of your port, maybe somewhere within the file, and
‫also take the EPA key so you have the EPA secret and the EPA and then you head back to your postman
‫in the header section of the request.
‫Are trying to make and key.
‫And that is within the authorization.
‫So other for authorization and then in the value section.
‫And then I'm talking.
‫So you have a token and then here you have two things.
‫And this is the EPA quién EPA secret that you took.
‫So make sure that they're following the order of the first one is the EPA key.
‫So the first one is whatever is here is the EPA key and then the second one will be your EPA secret
‫between them.
‫You have a column right now.
‫When we send this, we are supposed to be able to access this data.
‫And you can see we have been allowed to access that data from our from our EPA.
‫So this is the kind of EPA that I told you about it.
‫It needs the EPA key and the EPA secret to be able to access it.
‫Now, when you look at this EPA, before I close this one, look at the way this data is shown.
‫You do not know what is where.
‫You do not know what is in whatever.
‫You do not exactly know.
‫What is this?
‫This is something that we are going I am going to tell you to teach you in the next lecture and also
‫look at we cannot access this EPA without our talking.
‫So if I said this is going to complain that we do not have permission, how about those EPA that you
‫need to write and you do not need to have the DOE to supply the talking to you to access them?
‫How are you going to read that?
‫I am going to be showing you that in the next section on the next section of this discourse, because
‫so much.
‫And see you in the next one.